/*
 * File NiController.java 
 */
package cs.controller;

import cs.entity.User;
import cs.entity.UserFile;
import cs.entity.UserTextMessage;

/**
 * Interface of the chat controller with the chat network manager. <p>
 * Package  cs.controller
 * Project ChatSystemG1 - INSA 4INFOA1 - 2013/2014
 * @author Julie DUMONS & Juste OUEDRAOGO
 */
public interface NiController {
	
	 /**
     * update the userList 
     * add new user to the userList
     * @param user the user to add to the list
     */
	public void performAddUser(User user);
	
	/**
	 * update the userList 
     * remove new user from the userList
     * @param user the user who will be removed from the list
	 */
	public void performRemoveUser(User user);
	
	/**
	 * new text message arrival
	 */
	public void performAddReceivedMsg(UserTextMessage msg);
	
	/**
	 * get the message to send
	 */
	public UserTextMessage getMessageToSend();

	/**
	 * new File arrival
	 */
	public void performAddReceivedFile(UserFile uf); 
	/**
	 * action to do when file download or upload complete
	 */
	public void performUploadComplete(UserFile file);
	/**
	 * action to do when file download complete
	 */
	public void performDownloadComplete(UserFile file);
	/**
	 * action to do when receiving file request
	 */
	public void performReceivedFileRequest(UserFile file);
	
	/**
	 * action to do when receiving file answer
	 */
	public void performReceivedFileAnwser(UserFile file);
	/**
	 * get the file to be sent
	 */
	public UserFile getFileTosend(UserFile file);
	/**
	 * action to do when handling network error 
	 * 
	 */
	public void performNetworkError();
}
